<%--
  Created by IntelliJ IDEA.
  User: 86187
  Date: 2021/10/21
  Time: 10:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="resource/css/bootstrap.css">
    <script src="resource/js/jquery-3.2.1.js"></script>
    <script src="resource/js/bootstrap.js"></script>
    <script src="resource/My97DatePicker/WdatePicker.js"></script>
    <title>列表</title>
<script>
    function toAdd(){
        $("#nav-tabContent").load("toAdd");
    }

    /*function tj(){
        $("#nav-tabContent").load("list?"+$("form").serialize());
    }*/
    function goPage(pageNum){
        $("#nav-tabContent").load('list?pageNum='+pageNum+"&"+$("form").serialize());
    }
</script>
</head>
<form>
    <select name="rtype">
        <option value="">---请选择---</option>
        <option value="1" ${c.rtype==1?'selected':''}>借方</option>
        <option value="2" ${c.rtype==2?'selected':''}>贷方</option>
        <option value="3" ${c.rtype==3?'selected':''}>余额</option>
    </select>
    <input type="text" name="moneystart" value="${c.moneystart}">
    至<input type="text" name="moneyend" value="${c.moneyend}">
    <select name="type">
        <option value="">---请选择---</option>
        <option value="1" ${c.type==1?'selected':''}>源账号</option>
        <option value="2" ${c.type==2?'selected':''}>源账号名称</option>
        <option value="3" ${c.type==3?'selected':''}>目标账号</option>
        <option value="4" ${c.type==4?'selected':''}>目标账号名称</option>
        <option value="5" ${c.type==5?'selected':''}>科目编号</option>
        <option value="6" ${c.type==6?'selected':''}>科目</option>
    </select>
    <input type="text" name="mohu" value="${c.mohu}">
    摘要：<input type="text" name="digest" value="${c.digest}">
    财务日期：<input type="date" name="cwDate" value="<fmt:formatDate value="${c.cwDate}" pattern="yyyy-MM-dd"></fmt:formatDate>">
    <input type="button" onclick="goPage(1)" value="查询"><input type="button" onclick="toAdd()" value="添加">
</form>
<form>
    <table class="table">
        <tr align="center">
            <td>编号</td>
            <td>财务日期</td>
            <td>源账号</td>
            <td>源账号名称</td>
            <td>目标账号</td>
            <td>目标账号名称</td>
            <td>科目编号</td>
            <td>科目</td>
            <td>摘要</td>
            <td>借方</td>
            <td>贷方</td>
            <td>余额</td>
        </tr>
        <c:forEach items="${info.list}" var="a">
            <tr align="center">
                <td>${a.id}</td>
                <td>
                    <fmt:formatDate value="${a.cwDate}" pattern="yyyy-MM-dd"></fmt:formatDate>
                </td>
                <td>${a.yid}</td>
                <td>${a.cname}</td>
                <td>${a.oid}</td>
                <td>${a.oname}</td>
                <td>${a.courseId}</td>
                <td>${a.courseName}</td>
                <td>${a.digest}</td>
                <td>${a.debit}</td>
                <td>${a.credit}</td>
                <td>${a.balance}</td>
            </tr>
        </c:forEach>
                <jsp:include page="/resource/common/pages2.jsp"></jsp:include>
    </table>
</form>
<body>


</body>
</html>